package com.example.springboot2.controller;

import com.example.springboot2.entity.Login;
import com.example.springboot2.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * springboot  ssm
 * 构建成功
 * @projectName: springboot2
 * @package: com.example.springboot2.controller
 * @className: LoginController
 * @author: laoda
 * @description: TODO
 * @date: 2022/4/24 10:24
 * @version: 1.0
 */
@RestController
public class LoginController {
    @Autowired
    private LoginService   loginService;
    @RequestMapping(value = "/checkLogin",method = RequestMethod.POST)
    public Login checkLogin(Login login) {
        //返回结果集
        return loginService.checkLogin(login);
    }

    @RequestMapping(value = "/insert",method = RequestMethod.POST)
    public Boolean insert(Login login) {
        //返回结果集
        login=new Login(null,"2","2",null,null);
        return loginService.insert(login);
    }



}
